package samples.spring.beans;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class User {
    private static final Logger LOGGER = LoggerFactory.getLogger(User.class);

    private int id;

    private String name;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void init(){
        LOGGER.info("user init method called.");
    }

    public void destroy(){
        LOGGER.info("user destroy method called.");
    }

    @Override
    public String toString() {
        return "User{" +
            "id=" + id +
            ", name='" + name + '\'' +
            '}';
    }
}
